home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / mail / FTPMAL.lha / FTPMAL / FTPMALGUI.rexx < prev    next >
OS/2 REXX Batch file  |  1998-08-22  |  1KB  |  46 lines

  1. /* Part of FTPMAL.rexx */
  2.  
  3. address FTPMALGUI
  4.  
  5. window ID W TITLE '"Select files to be retrieved"' PORT FTPMALGUI COMMAND  "quit"
  6.  group
  7.   list ID A HELP """All files in Aminet list\n\nDoubleclick on entry to\nremove it from list"""
  8.     'button ID B1 COMMAND Rexx/mlist  HELP "Create message" LABEL Submit'
  9. /*button title All
  10.     button title None
  11.   button title Quit*/
  12.     list ID B HELP """Files which will be downloaded\n\nDoubleclick on entry to\nremove it from list"""
  13.  endgroup
  14. endwindow
  15.  
  16. i=0
  17. if open(Tmp,"t:ftpmal.tmp",'r') then do
  18.     do until EOF(Tmp)
  19.         L=readln(Tmp)
  20.         if substr(L,19,1,"|")=" " & substr(L,30,1,"|")=" " & index(L,"/")>21 & index(L,"/")<26 then do  /* Check is line part of Aminet list... */
  21.             list ID A POS i insert string L
  22.             i=i+1
  23.      end
  24.     end
  25.   call close(Tmp)
  26. end
  27. else do
  28.     address YAM
  29.     'request "Can not open 'TempFile'" "_Ok"'
  30.     exit
  31. end
  32.  
  33. callhook ID A PRESS PORT INLINE,
  34.             COMMAND """options results;
  35.                     address FTPMALGUI;
  36.                     line = '%s';
  37.                     'list ID B INSERT STRING' line;
  38.                     'list ID A REMOVE STRING' line;"""
  39.  
  40. callhook ID B PRESS PORT INLINE,
  41.             COMMAND """options results;
  42.                     address FTPMALGUI;
  43.                     line = '%s';
  44.                     'list ID A INSERT STRING' line;
  45.                     'list ID B REMOVE STRING' line;"""
  46.